import { kebabCase } from "element-plus/es/utils/strings.mjs";
import { KeepAlive } from "vue";

const constantRoute = [
  {
    name: "Layout",
    path: "/",
    component: () => import("@/layout/index.vue"),
    meta: {
      hidden: false,
      keepAlive: false,
    },
    redirect: "/home",
    children: [
      {
        name: "Login",
        path: "/login",
        component: () => import("@/pages/Login/index.vue"),
        meta: {
          title: "登录",
          hidden: false,
          keepAlive: false,
        },
      },
      {
        name: "Register",
        path: "/register",
        component: () => import("@/pages/Register/index.vue"),
        meta: {
          title: "注册",
          hidden: false,
          keepAlive: false,
        },
      },
      {
        name: "Retrieve",
        path: "/retrieve",
        component: () => import("@/pages/Retrieve/index.vue"),
        meta: {
          title: "找回密码",
          hidden: false,
          keepAlive: false,
        },
      },
      {
        name: "Home",
        path: "/home",
        component: () => import("@/pages/Home/index.vue"),
        meta: {
          title: "首页",
          hidden: false,
          keepAlive: false,
        },
      },
      {
        name: "Courses",
        path: "/courses",
        component: () => import("@/pages/Courses/index.vue"),
        meta: {
          title: "课程列表",
          hidden: true,
          keepAlive: false,
        },
      },
      {
        name: "Course",
        path: "/course",
        component: () => import("@/pages/Course/index.vue"),
        meta: {
          title: "课程内容",
          hidden: true,
          keepAlive: false,
        },
      },
      {
        name: "UserCenter",
        path: "/usercenter",
        component: () => import("@/pages/UserCenter/index.vue"),
        meta: {
          title: "用户中心",
          hidden: true,
          keepAlive: true,
        },
      },
      {
        name: "404",
        path: "/404",
        component: () => import("@/pages/404/index.vue"),
        meta: {
          title: "404",
          hidden: false,
          keepAlive: true,
        },
      },
    ],
  },
  // {
  //   //任意路由
  //   path: "/:pathMatch(.*)*",
  //   redirect: "/",
  //   name: "Any",
  //   meta: {
  //     title: "任意路由",
  //     hidden: true,
  //   },
  // },
];
export { constantRoute };
